<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <script src="../angular.js"></script>
</head>
<body>
<!--控制器-->
<p>尝试修改以下表单</p>

<div ng-app="myApp" ng-controller="myCtrl">
    <p>名: <input type="text" ng-model="firstName"></p>
    <p>姓: <input type="text" ng-model="lastName"></p>
    <h1>hello,{{lastName+" "+firstName}}</h1>
</div>
<script>
    var app = angular.module('myApp', []);
    app.controller('myCtrl', function($scope) {
        $scope.firstName= "John";
        $scope.lastName= "Doe";
    });
</script>
</body>
</html>